Apexsql log最佳实践 |
您所在的位置:网站首页 › log test › Apexsql log最佳实践 |
APEXSQL LOG 解析sql server 事务日志(整体默认DML)
create by : chaoqun.guo 基本介绍: 该软件工具主要是用来解析DML,通过分析事务日志得出redo和undo的SQL脚本。 【0】构建测试数据库与数据 【0.1】创建test数据库(完整模式)create database test on primary ( name='test_data', filename='d:\MSSQL_FIle\test_data.mdf', size=10MB, filegrowth=10MB ) log on ( name='test_log', filename='d:\MSSQL_FIle\test_log.ldf', size=10MB, filegrowth=10MB ) 【0.2】创建测试表 --(1) create test1 table , use create table use test; create table test1( id int identity(1,1) primary key, num1 int, num2 int, str1 varchar(100), str2 varchar(200) )
insert into test1(num1,num2,str1,str2) values(1,2,'a','b'); insert into test1(num1,num2,str1,str2) values(3,3,'aa','bb'),(4,4,'cc','dd');
--(2) select * into new_table from tablename use test; go ;with a as ( select 1 as id1 ,2 as id2 union all select id1+1,id2+1 from a where id1 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |